<template>
  <div class="diagnosis-chinese-pieces">
            <el-button @click="() => {
                this.pageStatus = 'view'
              }">view</el-button>
            <el-button @click="() => {
                this.pageStatus = 'add'
              }">add</el-button>

            <chinese-diagnosis-view v-if="pageStatus === 'view'"></chinese-diagnosis-view>
            <chinese-diagnosis-edit v-else></chinese-diagnosis-edit>
            <w-button :showBtn="true" v-if="pageStatus === 'view'"/>
  </div>
</template>

<script>
import chineseDiagnosisView from './chinese-diagnosis-view';
import chineseDiagnosisEdit from './chinese-diagnosis-edit';
import wButton from '../../../components/w-button';
export default {
  name: 'iAmPage',
  components: {
    chineseDiagnosisView,
    chineseDiagnosisEdit,
    wButton
  },
  props: {},
  data () {
    return {
      pageStatusList: ['add', 'edit', 'view'],
      pageStatus: 'add',
      obj: {
        a: 1
      }
    };
  },
  methods: {
    text(){
      
    }
  },
  mounted(){
      // setTimeout(() => {
      //     this.pageStatus = 'add'
      // }, 1000);
  },
  computed: {
    // pageStatus () {
    //   let type = get(this.$route.query, 'pageStatus', 'view');
    //   if (!this.pageStatusList.includes(type)) {
    //     type = this.pageStatusList[0];
    //   }
    //   return type;
    // }
  }
};
</script>
<style scoped>
.wrapper{}
</style>